package com.project.server.domain.estates;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.project.common.annotation.Excel;
import com.project.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 缴费规则对象 t_pay_rule
 *
 * @author project
 * @date 2021-06-28
 */
public class TPayRule extends BaseEntity {

    private static final long serialVersionUID = 8742585826105406284L;

    /**
     * 缴费规则编号
     */
    private Long ruleId;

    /**
     * 收费规则名称
     */
    @Excel(name = "收费规则名称",readConverterExp = "0=一级服务,1=二级服务,2=三级服务,3=等外服务")
    private String ruleName;

    /**
     * 缴费类型
     */
    @Excel(name = "缴费类型", readConverterExp = "00=物业费,01=水费,02=电费,03=气费,04=停车费")
    private String ruleType;

    /**
     * 缴费时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "缴费时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date ruleStartTime;

    /**
     * 到期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "到期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date ruleEndTime;

    /**
     * 缴费金额
     */
    @Excel(name = "缴费金额")
    private BigDecimal pay;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    public void setRuleId(Long ruleId) {
        this.ruleId = ruleId;
    }

    public Long getRuleId() {
        return ruleId;
    }

    public void setRuleName(String ruleName) {
        this.ruleName = ruleName;
    }

    public String getRuleName() {
        return ruleName;
    }

    public void setRuleType(String ruleType) {
        this.ruleType = ruleType;
    }

    public String getRuleType() {
        return ruleType;
    }

    public void setRuleStartTime(Date ruleStartTime) {
        this.ruleStartTime = ruleStartTime;
    }

    public Date getRuleStartTime() {
        return ruleStartTime;
    }

    public void setRuleEndTime(Date ruleEndTime) {
        this.ruleEndTime = ruleEndTime;
    }

    public Date getRuleEndTime() {
        return ruleEndTime;
    }

    public void setPay(BigDecimal pay) {
        this.pay = pay;
    }

    public BigDecimal getPay() {
        return pay;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("ruleId", getRuleId())
                .append("ruleName", getRuleName())
                .append("ruleType", getRuleType())
                .append("ruleStartTime", getRuleStartTime())
                .append("ruleEndTime", getRuleEndTime())
                .append("pay", getPay())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
